/*
 * @Author: your name
 * @Date: 2020-03-29 18:03:12
 * @LastEditTime: 2020-04-06 19:45:38
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \普联东文-未完成\js\news.js
 */
$(function () {
  if ($(document).scrollTop() != 0) {
    $('body,html').animate({ scrollTop: 0 }, 100);
}
  if ((navigator.userAgent.match(
      /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
    ))) {

    $('.common-footer').css({
      "position": "absolute",
      "top": $(window).height() + "px",
      "left": "0",
      "width": '1200px'
    })
  } else {


  }

  // 顶部导航出现

  // 顶部导航出现
  $(document).scroll(function () {
    var scroH = $(document).scrollTop(); //滚动高度
    var viewH = $(window).height(); //可见高度
    var contentH = $(document).height(); //内容高度

    $('.header .fl .img1').attr('src', '/web/images/logo2.png')
    $('.header').addClass('navxiding');
    $('.header .navbar_nav li').addClass('change');

    $('.navbar_nav a').css({
      'color': '#1f4c8a'
    })


    if (scroH >= 86) {
      opacityCount = 1;
      $('.header.navxiding').css({
        'background-color': 'rgba(255,255,255,1)',
        'top': '0'
      })
    } else {
      console.log(`小于等于86`);
      $('.navxiding').css({
        'background-color': 'rgba(255,255,255,0)'
      });
      $('.header .fl .img1').attr('src', '/web/images/logo.png')
      $('.header .navbar_nav li').removeClass('change');
      $('.header').removeClass('navxiding');
      $('.navbar_nav a').css({
        'color': '#fff',
      })
    }

  })
})